package com.dxysun.mybatis.spring.dao.impl;

import java.util.List;

import com.dxysun.mybatis.spring.dao.IUserDao;
import com.dxysun.mybatis.spring.domain.User;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImpl extends SqlSessionDaoSupport implements IUserDao
{

	@Autowired
	private SqlSessionFactory sqlSessionFactory;

	@Autowired
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory)
	{
		super.setSqlSessionFactory(sqlSessionFactory);
	}

	@Override
	public List<User> selectAll()
	{
		return getSqlSession().selectList("com.dxysun.mybatis.spring.mapper.UserMapper.selectUserList");
	}
}
